<!DOCTYPE html>
<!--
  ~ Copyright (C) 2018 guomw.Inc. All rights reserved.
  ~ 项目名称： mysite
  ~ 文件名称： edit.html
  ~ Date：18-10-15 下午4:46
  ~ Author: guomw
  -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/head::head('编辑商品')"></head>

<body class="gray-bg">
<link href="../../resource/css/plugins/summernote/summernote.css" rel="stylesheet">
<link href="../../resource/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
<style>
    .pin-strong {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .pin-reward .col-sm-12 {
        margin-bottom: 10px;
    }

    .pin-team-reward {
        width: 60px;
        display: inline-block;
        margin: 0 5px;
    }

    .add-pin-dot-config {
        margin-left: 20px;
        color: blue;
        cursor: pointer;
    }
</style>
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>编辑商品信息</h5>
        </div>
        <div class="ibox-content">
            <div class="tabs-container">
                <ul class="nav nav-tabs">
                    <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> 商品基本信息</a>
                    </li>
                    <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">奖励配置</a>
                    </li>
                    <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">商品详情</a>
                    </li>
                </ul>
                <div class="tab-content">
                    <div id="tab-1" class="tab-pane active">
                        <div class="panel-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">商品标题</label>
                                    <div class="col-sm-6">
                                        <input type="text" id="goodsName" name="goodsName" maxlength="30"
                                               class="form-control">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label labelGoodsPrice">零售价格</label>
                                    <div class="col-sm-2">
                                        <input type="text" id="goodsPrice" name="goodsPrice" maxlength="30"
                                               class="form-control OnlyFloat">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label labelGoodsPrice">批发价格</label>
                                    <div class="col-sm-2">
                                        <input type="text" id="wholesalePrice" name="wholesalePrice" maxlength="30"
                                               class="form-control OnlyFloat">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label labelGoodsPrice">配送数量</label>
                                    <div class="col-sm-2">
                                        <input type="text" id="quotaCount" name="quotaCount" maxlength="30"
                                               class="form-control OnlyNum">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label labelGoodsPrice">零售库存</label>
                                    <div class="col-sm-2">
                                        <input type="text" readonly disabled id="retailStore" maxlength="30"
                                               class="form-control OnlyNum">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label labelGoodsPrice">批发库存</label>
                                    <div class="col-sm-2">
                                        <input type="text" id="totalWholesaleStore" name="totalWholesaleStore"
                                               maxlength="30" class="form-control OnlyNum">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label labelGoodsPrice">限购</label>
                                    <div class="col-sm-10">
                                        <input type="text" id="todayLimitBuy"
                                               style="display:inline-block;width:100px;margin-right: 5px;"
                                               name="todayLimitBuy" maxlength="30" class="form-control OnlyNum"> <span
                                            style="color: red;">(说明：每个用户每日限购数。限购是针对零售商品，批发商品不限)</span>
                                    </div>
                                    `
                                </div>


                                <div class="form-group">
                                    <label class="col-sm-2 control-label">商品图片</label>
                                    <div class="col-sm-8">
                                        <input type="hidden" id="goodsPic" value=""/>
                                        <input type="hidden" id="goodsFullPic" value=""/>
                                        <input type="file" style="display: none" id="uploadfile" name="uploadfile" readonly="readonly"
                                               class="form-control">
                                        <a title="选择商品图片">
                                            <img class="imgpreview" src="../../resource/img/bg.png" onerror="this.src='/resource/img/bg.png'"
                                                 style="margin-top: 10px; width:200px;height:200px;"
                                            />
                                        </a>
                                        <div style="color: grey;">建议尺寸：400*400</div>
                                    </div>


                                </div>
                            </form>
                        </div>
                    </div>
                    <div id="tab-2" class="tab-pane">
                        <div class="panel-body">
                            <form class="form-horizontal">
                                <div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">商品详情</label>
                                        <div class="col-sm-8" id="eg">
                                            <div class="ibox-content no-padding">
                                                <div class="summernote" id="description"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div id="tab-3" class="tab-pane">
                        <div class="panel-body">
                            <form class="form-horizontal">
                                <strong class="pin-strong">拼团奖励</strong>
                                <div class="form-group pin-reward">
                                    <div class="col-sm-12">
                                        直推达到
                                        <input type="text" id="invitePeopleCount" name="invitePeopleCount"
                                               maxlength="10" value="0" class="form-control OnlyNum pin-team-reward">人，
                                        每手拿一代
                                        <input type="text" id="eachPenTakeReward" name="eachPenTakeReward"
                                               maxlength="30" value="0"
                                               class="form-control OnlyFloat pin-team-reward">元
                                    </div>
                                    <div class="col-sm-12">
                                        直推达到
                                        <input type="text" id="invitePeopleCount2" name="invitePeopleCount2"
                                               maxlength="10" value="0" class="form-control OnlyNum pin-team-reward">人，
                                        每手拿二代
                                        <input type="text" id="eachPenTakeReward2" name="eachPenTakeReward2"
                                               maxlength="30" value="0"
                                               class="form-control OnlyFloat pin-team-reward">元
                                    </div>
                                </div>
                                <strong class="pin-strong">拼点奖励</strong>
                                <span class="add-pin-dot-config">添加一条配置</span>
                                <div class="form-group pin-reward pin-dot">

                                </div>
                            </form>
                        </div>
                    </div>

                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-8 col-sm-offset-5">
                    <button class="btn btn-success btn-submit" type="button" onclick="jsHelper.edit()">提交
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="pin_dot_reward_config" type="text/html">
    <div class="col-sm-12 row_{sort}">
        <input type="hidden" id="sort_{sort}" value="{sort}"/>
        到达
        <input type="text" id="finishPenCount_{sort}" value="{finishPenCount}" maxlength="10"
               class="form-control OnlyNum pin-team-reward">手，
        并且直推人数最少
        <input type="text" id="inviteMinPeopleCount_{sort}" value="{inviteMinPeopleCount}" maxlength="10"
               class="form-control OnlyNum pin-team-reward">人，

        最小分支达到
        <input type="text" id="minBranchPeopleCount_{sort}" value="{minBranchPeopleCount}" maxlength="10"
               class="form-control OnlyNum pin-team-reward">手，
        每手奖励
        <input type="text" id="eachPenReward_{sort}" value="{eachPenReward}" maxlength="30"
               class="form-control OnlyFloat pin-team-reward">仓单值，

        平一级，奖励
        <input type="text" id="flatLevelReward_{sort}" value="{flatLevelReward}" maxlength="30"
               class="form-control OnlyFloat pin-team-reward">仓单值
        <span class="remove_{sort}">
            <a id="id_{sort}" data-id="{sort}" class="pin-remove">删除</a>
        </span>
    </div>
</script>
<script id="remove_tempate" type="text/html">
    <a id="id_{sort}" data-id="{sort}" class="pin-remove">删除</a>
</script>
<footer th:include="common/footer::js"/>
<script src="../../resource/js/plugins/prettyfile/bootstrap-prettyfile.js"></script>
<script src="../../resource/js/plugins/summernote/summernote.min.js"></script>
<script src="../../resource/js/plugins/summernote/summernote-zh-CN.js"></script>
<script src="../../resource/js/views/goodsedit.js?20190227131"></script>
</body>

</html>